package edu.cmu.atlub.api;

import java.io.IOException;
import java.net.URLEncoder;
import java.util.HashMap;

import org.apache.http.HttpEntity;
import org.apache.http.HttpResponse;
import org.apache.http.auth.AuthScope;
import org.apache.http.auth.UsernamePasswordCredentials;
import org.apache.http.client.ClientProtocolException;
import org.apache.http.client.HttpClient;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.client.methods.HttpRequestBase;
import org.apache.http.entity.AbstractHttpEntity;
import org.apache.http.entity.StringEntity;
import org.apache.http.entity.mime.MultipartEntity;
import org.apache.http.entity.mime.content.StringBody;
import org.apache.http.impl.client.AbstractHttpClient;
import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.http.params.HttpParams;

public class AuthenticationManager {
    
    private static final String AUTH_USERNAME = "menphix";
    private static final String AUTH_PASSWORD = "socialmedia";


    private AuthenticationManager() {
	// intentionally left blank
    }

    public static void updateHttpClientCredentials(DefaultHttpClient httpclient) throws ClientProtocolException, IOException {
	httpclient.getCredentialsProvider().setCredentials(new AuthScope(AuthScope.ANY_HOST, AuthScope.ANY_PORT),
		new UsernamePasswordCredentials(AUTH_USERNAME, AUTH_PASSWORD));
    }

}
